<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ page import="com.liuya.db.sql.xml.DefineVariable" %>
<%@ page import="com.liuya.safe.policy.handler.AbstractPolicyDesignHandler" %>
<%@ page import="com.liuya.db.sql.xml.ContextValue" %>
<%@ page import="com.liuya.common.I18N" %>

<%
    I18N i18n = I18N.getInstance();
    AbstractPolicyDesignHandler handler = (AbstractPolicyDesignHandler) request.getAttribute("handler");
    String id = request.getParameter("id");
%>

<div class="treeDiv">
    <label><%=i18n.say("Expression")%>
    </label>
    <ul id="exprGroup" class="tree"></ul>
</div>
<div class="editDiv">
    <div id="exprContextMenu"></div>
</div>

<div class="clearDiv"></div>
<script type="text/javascript">
    jQuery(document).ready(function () {
        var exprTreeSetting = {
            async: true,
            /**editable: true,
             edit_renameBtn: false,
             edit_removeBtn: false,
             dragMove: true,*/
            isSimpleData: true,
            treeNodeKey: "id",
            treeNodeParentKey: "pId",
            asyncUrl: "loadExprTree.do?oper=loadExprTree&id=<%=id%>",
            callback: {
                click: clickExprTree
            },
            asyncParam: ["name", "id"]
        };

        var treeNodes = [];
        jQuery("#exprGroup").zTree(exprTreeSetting, treeNodes);
    });


</script>